<template>
	<view :class="[BackGround]" :style="[{'font-weight':Style,'font-family':Font,height:100 + '%',minHeight:height + 'px'}]">
		<cu-custom bgColor="bg-gradual-blue" isBack="true">
			<view slot="backText">返回</view>
			<view slot="content">作业调度</view>
		</cu-custom>
		<list-box ref="list" :list="list" @jumpview="jumpview" @zylongtap="zylongtap"></list-box>
		<chunLei-popups v-model="value1" :popData="data1" @tapPopup="tapPopup" @zyinput="zyinput" :x="x" :y="y" placement="top-end"></chunLei-popups>
	</view>
</template>

<script>
	import chunLeiPopups from "@/colorui/components/chunLei-popups/chunLei-popups"
	import ListBox from '@/colorui/components/list.vue'
	import {
		mapGetters
	} from 'vuex'
	import {
		Commonly,
	} from "@/mixin/mixin.js"
	export default {
		mixins:[Commonly],
		data() {
			return {
				height:this.screenHeight,
				list: [{
					img: "/static/images/Orderentry.png",
					name: '生产订单',
					url:"./production/Orderentry/Orderentry",
					LMENUID:'970902',
					isShow:false,
					id: 0
				}, {
					img: "/static/images/Orderscheduling.png",
					url:"./production/Orderscheduling/Orderscheduling",
					name: '生产调度',
					LMENUID:'970903',
					isShow:false,
					id: 1
				}, {
					img: "/static/images/Processsheet.png",
					url:"./production/Processsheet/Processsheet",
					name: '工艺单',
					LMENUID:'970904',
					isShow:false,
					id: 2
				}, {
					img: "/static/images/Certificateofconformity.png",
					url:"./production/Certificateofconformity/Certificateofconformity",
					name: '合格单',
					LMENUID:'970905',
					isShow:false,
					id: 3
				}, {
					img: "/static/images/ordertracking.png",
					url:"./production/ordertracking/ordertracking",
					name: '订单跟踪',
					LMENUID:'970906',
					isShow:false,
					id: 4
				}
				// , {
				// 	img: "/static/images/Endoforder.png",
				// 	name: '订单完结',
				// 	// LMENUID:'970902',
				// 	isShow:false,
				// 	id: 5
				// }, {
				// 	img: "/static/images/Orderinquiry.png",
				// 	name: '调度查询',
				// 	LMENUID:'970902',
				// 	isShow:false,
				// 	id: 6
				// }, {
				// 	img: "/static/images/Distributionsettings.png",
				// 	name: '配台设置',
				// 	LMENUID:'970907',
				// 	isShow:false,
				// 	id: 7
				// },
				],
			}
		},
		computed: {
			...mapGetters([
				'Style',
				'Font', 'BackGround', 'BackGroundBox'
			])
		},
		components: {
			ListBox,
			chunLeiPopups
		},
		onLoad() {
			let tree = uni.getStorageSync('tree')
			for (let value of tree) {
				if (value.LPARENTID == '00') {
					for (let qq of value.children) {
						if (qq.LMENUID == '9709') {
							for (let hh of qq.children) {
								for(let ww of this.list) {
									if(hh.LMENUID == ww.LMENUID) {
										ww.isShow = true
									}
								}
							}
						}
					}
				}
			}
		},
		methods: {
			jumpview(index) {
				switch (index) {
					case 0:
						uni.navigateTo({
							url: './Orderentry/Orderentry',
						});
						break;
					case 1:
						uni.navigateTo({
							url: './Orderscheduling/Orderscheduling',
						});
						break;
					case 2:
						uni.navigateTo({
							url: './Processsheet/Processsheet',
						});
						break;
					case 3:
						uni.navigateTo({
							url: './Certificateofconformity/Certificateofconformity',
						});
						break;
					case 4:
						uni.navigateTo({
							url: './ordertracking/ordertracking',
						});
						break;
					case 5:
						uni.navigateTo({
							url: './Endoforder/Endoforder',
						});
						break;
					case 6:
						uni.navigateTo({
							url: './Orderinquiry/Orderinquiry',
						});
						break;
					case 7:
						uni.navigateTo({
							url: './Distributionsettings/Distributionsettings',
						});
						break;
					default:
						break;
				}
			}
		}
	}
</script>

<style>

</style>
